home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / gl / Amigamesa.h next >
C/C++ Source or Header  |  1999-06-01  |  21KB  |  489 lines

  1. /* Amigamesa.h */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  1.2
  6.  * Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /* Important note (03.01.1998 by Sam Jordan)
  25.  
  26. When using windows you should use window->BorderBottom for AMA_Bottom,
  27. not window->BorderBottom+1! Please change your existing MESA application
  28. when using this implementation here. The reason for this change is that
  29. the current implementation doesn't decrease the viewport size by 2 to
  30. get an additional border (which doesn't look nice and which didn't work
  31. correctly either).
  32.  
  33. When using the TK window layer you don't have to change anything.
  34.  
  35. */
  36.  
  37.  
  38. /*
  39. Implementions of new drawing rutines:
  40.  
  41. you implement a own init for your rutines/hardware
  42. and make some test and calls it from AmigaMesaCreateContext()
  43. (look in the file src/amigamesa.c I'll thing you get it)
  44. Be sure to fill this three ponters out:
  45.     void (*InitDD)( void );
  46.     void (*Dispose) (struct amigamesa_context *c);
  47.     void (*SwapBuffer) (void);
  48. where InitDD sets the DD structure in orginal mesa with pointers to drawing rutines
  49. Dispose is called when someone quits/closes down your made inits
  50. SwapBuffer is called when one is changing buffer in dubble buffering mode
  51.  
  52. Write nice drawing rutines like those in src/amigamesa.c on make sure
  53. that it's those you set in your InitDD rutine.
  54.  
  55. Add enum for your drawingmode for the taglist and if you need more tags also implement them
  56. If posible some autodetection code in AmigaMesaCreateContext
  57. Add enums and error codes if you neads 
  58.  
  59. PUT ALL YOUR NEADED DATA IN amigamesa_context->(void *)data in for your gfx driver
  60. private structure.
  61.  
  62. Send the code to me and I will include it in the main code.
  63. */
  64.  
  65. /*
  66. $Id: Amigamesa.h 1.4 1996/10/13 20:54:31 StefanZ Exp StefanZ $
  67.  
  68. $Log: Amigamesa.h $
  69.  * Revision 1.4  1996/10/13  20:54:31  StefanZ
  70.  * Updated to reflect amigamesa 1.5
  71.  *
  72.  * Revision 1.3  1996/10/06  20:35:11  StefanZ
  73.  * Source bump before Mesa 2.0
  74.  *
  75.  * Revision 1.2  1996/08/14  22:16:31  StefanZ
  76.  * New Api to amigaspecific functions, Added suport for gfx-cards
  77.  *
  78.  * Revision 1.1  1996/06/02  00:15:03   StefanZ
  79.  * Initial revision
  80.  *
  81.  * Revision 1.0  1996/02/21  11:09:45   brianp
  82.  * A copy of amesa.h version 1.4 in a brave atempt to make a amiga interface
  83.  *
  84.  */
  85.  
  86.  
  87. /* Example usage:
  88.  
  89. 1. Make a window using Intuition calls
  90.  
  91. 2. Call AMesaCreateContext() to make a rendering context and attach it
  92.     to the window made in step 1.
  93.  
  94. 3. Call AMesaMakeCurrent() to make the context the active one.
  95.  
  96. 4. Make gl* calls to render your graphics.
  97.  
  98. 5. When exiting, call AMesaDestroyContext().
  99.  
  100. */
  101.  
  102.  
  103.  
  104. #ifndef AMIGAMESA_H
  105. #define AMIGAMESA_H
  106.  
  107. #ifdef __cplusplus
  108. extern "C" {
  109. #endif
  110.  
  111. #ifndef APIENTRY
  112. #ifndef NOSAVEDS
  113. #define APIENTRY __saveds
  114. #else
  115. #define APIENTRY
  116. #endif
  117. #endif
  118.  
  119. #include <exec/libraries.h>
  120. #include <intuition/intuition.h>
  121. #include <utility/tagitem.h>
  122. #include "GL/gl.h"
  123.  
  124.  
  125.  
  126. struct amigamesa_visual
  127. {
  128.    void *gl_visual;
  129.    GLboolean db_flag;           /* double buffered? */
  130.    GLboolean rgb_flag;          /* RGB mode? */
  131.    GLboolean alpha_flag;   /* Alphacolor? */
  132.    GLuint        depth;                         /* bits per pixel (1, 8, 24, etc) */
  133.    GLuint        stencil;
  134.    GLuint        accum;
  135. };
  136.  
  137.  
  138.  
  139. struct amigamesa_buffer
  140. {
  141.    void *gl_buffer;    /* The depth, stencil, accum, etc buffers */
  142.    /* your window handle, etc */
  143. };
  144.  
  145.  
  146. /*
  147.  * This is the Amiga/Mesa context structure.  This usually contains
  148.  * info about what window/buffer we're rendering too, the current
  149.  * drawing color, etc.
  150.  */
  151.  
  152. /* 5.9.98 sj
  153.    this structure must not be accessed directly by applications
  154.    anymore */
  155.  
  156. struct amigamesa_context
  157. {
  158.     void *gl_ctx;                   /* the core library context */
  159.     struct amigamesa_visual  *visual; /* the visual context */
  160.     struct amigamesa_buffer  *buffer; /* the buffer context */
  161.  
  162.     struct amigamesa_context *share;
  163.  
  164.     unsigned long flags;                    /*0x1 = own visuel, 0x2 = own buffer
  165.                           0x4 = forbid 3D HW, 0x8 = fullscreen mode */
  166.  
  167.  
  168.     unsigned long pixel;                    /* current color index or RGBA pixel value */
  169.     unsigned long clearpixel;       /* pixel for clearing the color buffers */
  170.  
  171.     /* etc... */
  172.     struct Window *window;                  /* Not neaded if in dubbelbuff needed */                /* the Intuition window */
  173.     struct RastPort *front_rp;      /* front rastport */
  174.     struct RastPort *back_rp;               /* back rastport */
  175.     int    SwapCounter;                     /* which buffer is active */
  176.     UBYTE* FrontArray;                                      /* for multibuffering */
  177.     UBYTE* BackArray;                                       /*a pen Array big as drawing area for use in dubelbuff mode*/
  178.     struct RastPort *rp;                    /* current rastport */
  179.     struct Screen *Screen;                  /* current screen*/
  180.     struct TmpRas *tmpras;                  /* tmpras rastport */
  181.     struct RastPort *temprp;
  182.     struct DBufInfo *dbufinfo;              /* OS3.0 multibuffering */
  183.  
  184.     GLuint depth;                                           /* bits per pixel (1, 8, 24, etc) */
  185.     GLuint bppix;                           /* bytes per pixel */
  186.     GLuint bprow;                           /* bytes per row */
  187.     GLuint fmt;                             /* color format */
  188.  
  189.     GLuint  width, height;                          /* drawable area */
  190.     GLint           left, bottom;                           /* offsets due to window border */
  191.     GLint           right, top;             /* right, top offsets, needed for correct resizing */
  192.     GLint           RealWidth,RealHeight;   /* the drawingareas real size*/
  193.     GLint           FixedWidth,FixedHeight; /* The internal buffer real size speeds up the drawing a bit*/
  194.     long*           ColorTable;             /* LUT8 display: ARGB -> real pen conversion */
  195.                         /* ARGB display: ARGB -> GL pen conversion */
  196.     long*           ColorTable2;            /* LUT8 display: table of allocated pens */
  197.                         /* ARGB display: GL pen -> ARGB conversion */
  198.     UBYTE penconv[256];                     /* pen conversion from GL color to real color */
  199.     UBYTE penconvinv[256];                  /* pen conversion from real color to GL color */
  200.     UBYTE dtable[256];
  201.     UBYTE bugfix[256];
  202.     UBYTE *imageline;                                       /* One Line for WritePixelRow renders */
  203.     GLuint *rgb_buffer;                                     /*back buffer when in RGBA mode OLD DElete?*/
  204.  
  205.     void (*InitDD)(void *  );                                                                  /* keep track of witch drawing rutines should be used */
  206.     void (*Dispose) (struct amigamesa_context *c);          /* Use this when AmigaMesaDestroyContext is called */
  207.     void (*SwapBuffer) (struct amigamesa_context *c);       /* Use this when AmigaMesaSwapBuffers is called */
  208.     ULONG ColTable[256];
  209.     ULONG ColTable2[256];
  210.     ULONG oldFPU;                           /* old rounding mode */
  211.     UBYTE pixelargb[4];
  212.     ULONG specialalloc;
  213.     UBYTE dmatrix[128+8];
  214.     struct ScreenBuffer *sbuf1;              /* OS3.0 multibuffering */
  215.     struct ScreenBuffer *sbuf2;              /* OS3.0 multibuffering */
  216.     struct MsgPort* dbport;                  /* OS3.0 multibuffering */
  217.     int drawbufferflag;                     /* GL double buffering support  */
  218.     int readbufferflag;                     /*              "               */
  219.     int backarrayflag;                      /*              "               */
  220.     UBYTE* DrawBuffer;                      /*              "               */
  221.     UBYTE* ReadBuffer;                      /*              "               */
  222.     struct RastPort *back2_rp;              /* second back rastport */
  223.     struct RastPort *draw_rp;
  224.     void *hwdriver;                         /* hwdriver private structure */
  225.     struct ScreenBuffer *sbuf3;             /* third screen buffer */
  226.     struct ScreenBuffer *sbuf_initial;      /* initial screen buffer */
  227. };
  228.  
  229. /* possible values for flags */
  230.  
  231. #define FLAG_OWNVISUAL    0x01             /*see AMA_Visual*/
  232. #define FLAG_OWNBUFFER    0x02             /*see AMA_Buffer*/
  233. #define FLAG_FORBID3DHW   0x04             /*forbid using 3D-HW*/
  234. #define FLAG_FULLSCREEN   0x08             /*fullscreen mode*/
  235. #define FLAG_DIRECTRENDER 0x10             /*direct rendering to gfx RAM*/
  236. #define FLAG_TWOBUFFERS   0x20             /*two color buffers*/
  237. #define FLAG_FAST         0x40             /*less quality, more speed*/
  238. #define FLAG_VERYFAST     0x80             /*AFAP*/
  239. #define FLAG_RGBA         0x100            /*private*/
  240. #define FLAG_SYNC         0x200            /*synchronize window refresh*/
  241. #define FLAG_TRIPLE       0x400            /*triple buffering*/
  242.  
  243. typedef struct amigamesa_context *AmigaMesaContext;
  244.  
  245. /* support functions in separate link libs */
  246.  
  247. struct Library* OpenGLLibrary(void);
  248. struct Library* OpenGLULibrary(struct Library*);
  249. struct Library* OpenGLUTLibrary(struct Library*, struct Library* );
  250. struct Library* OpenGLELibrary(struct Library*, struct Library* );
  251. struct Library* OpenGLSMAPLibrary(struct Library*, struct Library* );
  252. void CloseGLLibrary(struct Library* );
  253. void CloseGLULibrary(struct Library* );
  254. void CloseGLUTLibrary(struct Library* );
  255. void CloseGLELibrary(struct Library* );
  256. void CloseGLSMAPLibrary(struct Library* );
  257.  
  258. /**********************************************************************/
  259. /*****                                  Amiga/Mesa API Functions                                                        *****/
  260. /**********************************************************************/
  261. struct amigamesa_visual *AmigaMesaCreateVisualTags(long Tag1, ...);
  262. struct amigamesa_context *AmigaMesaCreateContextTags(long Tag1, ...);
  263. void AmigaMesaSetRastTags(struct amigamesa_context* c, long Tag1, ...);
  264.  
  265. #ifndef __STORM__
  266. #ifdef __VBCC__
  267. struct amigamesa_visual* APIENTRY AmigaMesaCreateVisual(struct TagItem *tagList);
  268. struct amigamesa_context* APIENTRY AmigaMesaCreateContext(struct TagItem *tagList );
  269. void APIENTRY AmigaMesaDestroyContext(struct amigamesa_context *c );
  270. void APIENTRY AmigaMesaDestroyVisual(struct amigamesa_visual *v );
  271. void APIENTRY AmigaMesaMakeCurrent(struct amigamesa_context *c ,struct amigamesa_buffer *b);
  272. void APIENTRY AmigaMesaSwapBuffers(struct amigamesa_context *amesa);
  273. void APIENTRY AmigaMesaSetOneColor(struct amigamesa_context *c,int index,float r,float g,float b);
  274. void APIENTRY AmigaMesaSetRast(struct amigamesa_context *c, struct TagItem *tagList );
  275. void APIENTRY AmigaMesaGetConfig(struct amigamesa_visual *v, GLenum pname, GLint* params );
  276. #if defined(GL_INLINE) || defined(__PPC__)
  277. #include <proto/amigamesa.h>
  278. #endif
  279. #else
  280. #ifdef __GNUC__ /* if under EGCS/GCC environement */
  281. #ifndef __PPC
  282. #ifndef __cplusplus /* Just to prevent if we include this file in g++ mode */
  283. APIENTRY struct amigamesa_visual *AmigaMesaCreateVisual(struct TagItem *tagList __asm("a0"));
  284. APIENTRY struct amigamesa_context *AmigaMesaCreateContext(struct TagItem *tagList __asm("a0"));
  285. APIENTRY void AmigaMesaDestroyVisual(struct amigamesa_visual *v __asm("a0"));
  286. APIENTRY void AmigaMesaDestroyContext(struct amigamesa_context *c __asm("a0"));
  287. APIENTRY void AmigaMesaMakeCurrent(struct amigamesa_context *c __asm("a0"), struct amigamesa_buffer *b __asm("a1"));
  288. APIENTRY void AmigaMesaSwapBuffers(struct amigamesa_context *amesa __asm("a0"));
  289. APIENTRY void AmigaMesaSetOneColor(struct amigamesa_context *c __asm("a0"), int index __asm("d0"), float r __asm("fp0"), float g __asm("fp1"), float b __asm("fp2"));
  290. APIENTRY void AmigaMesaSetRast(struct amigamesa_context *c __asm("a0"), struct TagItem *tagList __asm("a1"));
  291. APIENTRY void AmigaMesaGetConfig(struct amigamesa_visual *v __asm("a0"), GLenum pname __asm("d0"), GLint* params __asm("a1"));
  292. #endif
  293. #else
  294. #define AmigaMesaCreateVisualTags(Tag1...) \
  295.     ({ULONG _tags[] = { Tag1 }; AmigaMesaCreateVisual((struct TagItem *)_tags);})
  296. #define AmigaMesaCreateContextTags(Tag1...) \
  297.     ({ULONG _tags[] = { Tag1 }; AmigaMesaCreateContext((struct TagItem *)_tags);})
  298. #define AmigaMesaSetRastTags( c , Tag1...) \
  299.     ({ULONG _tags[] = { Tag1 }; AmigaMesaSetRast((c),(struct TagItem *)_tags);})
  300.  
  301. struct amigamesa_visual* APIENTRY AmigaMesaCreateVisual(struct TagItem *tagList);
  302. struct amigamesa_context* APIENTRY AmigaMesaCreateContext(struct TagItem *tagList );
  303. void APIENTRY AmigaMesaDestroyContext(struct amigamesa_context *c );
  304. void APIENTRY AmigaMesaDestroyVisual(struct amigamesa_visual *v );
  305. void APIENTRY AmigaMesaMakeCurrent(struct amigamesa_context *c ,struct amigamesa_buffer *b);
  306. void APIENTRY AmigaMesaSwapBuffers(struct amigamesa_context *amesa);
  307. void APIENTRY AmigaMesaSetOneColor(struct amigamesa_context *c,int index,float r,float g,float b);
  308. void APIENTRY AmigaMesaSetRast(struct amigamesa_context *c, struct TagItem *tagList );
  309. void APIENTRY AmigaMesaGetConfig(struct amigamesa_visual *v, GLenum pname, GLint* params );
  310. #endif
  311. #else
  312. __asm APIENTRY struct amigamesa_visual *AmigaMesaCreateVisual(register __a0 struct TagItem *tagList);
  313. __asm APIENTRY struct amigamesa_context *AmigaMesaCreateContext(register __a0 struct TagItem *tagList );
  314. __asm APIENTRY void AmigaMesaDestroyVisual(register __a0 struct amigamesa_visual *v );
  315. __asm APIENTRY void AmigaMesaDestroyContext(register __a0 struct amigamesa_context *c );
  316. __asm APIENTRY void AmigaMesaMakeCurrent(register __a0 struct amigamesa_context *c ,register __a1    struct amigamesa_buffer *b);
  317. __asm APIENTRY void AmigaMesaSwapBuffers(register __a0 struct amigamesa_context *amesa);
  318. __asm APIENTRY void AmigaMesaSetOneColor(register __a0 struct amigamesa_context *c, register __d0 int index, register __fp0 float r, register __fp1 float g, register __fp2 float b);
  319. __asm APIENTRY void AmigaMesaSetRast(register __a0 struct amigamesa_context *c, register __a1 struct TagItem *tagList );
  320. __asm APIENTRY void AmigaMesaGetConfig(register __a0 struct amigamesa_visual *v, register __d0 GLenum pname, register __a1 GLint* params );
  321. #endif
  322. #endif
  323. #else
  324. #ifndef __PPC__
  325. struct amigamesa_visual* APIENTRY AmigaMesaCreateVisual(register __a0 struct TagItem *tagList);
  326. struct amigamesa_context* APIENTRY AmigaMesaCreateContext(register __a0 struct TagItem *tagList );
  327. void APIENTRY AmigaMesaDestroyContext(register __a0 struct amigamesa_context *c );
  328. void APIENTRY AmigaMesaDestroyVisual(register __a0 struct amigamesa_visual *v );
  329. void APIENTRY AmigaMesaMakeCurrent(register __a0 struct amigamesa_context *c ,register __a1    struct amigamesa_buffer *b);
  330. void APIENTRY AmigaMesaSwapBuffers(register __a0 struct amigamesa_context *amesa);
  331. void APIENTRY AmigaMesaSetOneColor(register __a0 struct amigamesa_context *c, register __d0 int index, register __fp0 float r, register __fp1 float g, register __fp2 float b);
  332. void APIENTRY AmigaMesaSetRast(register __a0 struct amigamesa_context *c, register __a1 struct TagItem *tagList );
  333. void APIENTRY AmigaMesaGetConfig(register __a0 struct amigamesa_visual *v, register __d0 GLenum pname, register __a1 GLint* params );
  334. #else
  335. struct amigamesa_visual* APIENTRY AmigaMesaCreateVisual(struct TagItem *tagList);
  336. struct amigamesa_context* APIENTRY AmigaMesaCreateContext(struct TagItem *tagList );
  337. void APIENTRY AmigaMesaDestroyContext(struct amigamesa_context *c );
  338. void APIENTRY AmigaMesaDestroyVisual(struct amigamesa_visual *v );
  339. void APIENTRY AmigaMesaMakeCurrent(struct amigamesa_context *c ,struct amigamesa_buffer *b);
  340. void APIENTRY AmigaMesaSwapBuffers(struct amigamesa_context *amesa);
  341. void APIENTRY AmigaMesaSetOneColor(struct amigamesa_context *c,int index,float r,float g,float b);
  342. void APIENTRY AmigaMesaSetRast(struct amigamesa_context *c, struct TagItem *tagList );
  343. void APIENTRY AmigaMesaGetConfig(struct amigamesa_visual *v, GLenum pname, GLint* params );
  344. #endif
  345. #endif
  346.  
  347.  
  348.  
  349.  
  350. /*
  351.  * Amiga Mesa Attribute tag ID's.  These are used in the ti_Tag field of
  352.  * TagItem arrays passed to AmigaMesaSetDefs() and AmigaMesaCreateContext()
  353.  */
  354. #define AMA_Dummy       (TAG_USER + 32)
  355.  
  356. /*
  357. Offset to use. WARNING AMA_Left, AMA_Bottom Specifies the low left corner
  358. of the drawing area in deltapixles from the lowest left corner
  359. typical AMA_Left,window->BorderLeft
  360.           AMA_Bottom,window->BorderBottom + 1
  361.  
  362. 03.01.1998 Note by Sam Jordan: Use window->BorderBottom for this current
  363. implementation. Now the viewport size isn't decreased by 2 as in previous
  364. implementations.
  365.  
  366.  
  367. This is since ALL gl drawing actions is specified with this point as 0,0
  368. and with y positive uppwards (like in real graphs).
  369.  
  370. Untuched (defult) will result in 
  371. AMA_Left=0;
  372. AMA_Bottom=0;
  373. */
  374. #define AMA_Left                (AMA_Dummy + 0x0001)
  375. #define AMA_Bottom      (AMA_Dummy + 0x0002)
  376.  
  377. /*
  378. Size in pixels of drawing area if others than the whole rastport.
  379. All internal drawingbuffers will be in this size
  380.  
  381. Untuched (defult) will result in 
  382. AMA_Width =rp->BitMap->BytesPerRow*8;
  383. AMA_Height=rp->BitMap->Rows;
  384. */
  385. #define AMA_Width       (AMA_Dummy + 0x0003)
  386. #define AMA_Height      (AMA_Dummy + 0x0004)
  387.  
  388. /*
  389. AMA_DrawMode: Specifies the drawing hardware and should be one of
  390.                   AGA,(CYBERGFX,RETINA)
  391.                   Defult value: AGA
  392. if AMESA_AGA Amiga native drawigns
  393.     this has to be filled with data
  394.         AMA_Window = (ptr) Window to draw on
  395.     or
  396.         AMA_Screen =(ptr) Screen to draw on.
  397.         AMA_RastPort =(ptr) RastPort to draw on.
  398. if AMESA_AGA_C2P Amiga native drawing using a chunky buffer
  399.          thats converted when switching drawbuffer
  400.          only works on doublebuffered drawings.
  401.     this has to be filled with data
  402.         AMA_DoubleBuf = GL_TRUE
  403.         AMA_Window = (ptr) Window to draw on
  404.     or
  405.         AMA_DoubleBuf = GL_TRUE
  406.         AMA_Screen =(ptr) Screen to draw on.
  407.         AMA_RastPort =(ptr) RastPort to draw on.
  408.  
  409. else
  410.    here should all needed gfx-card tagitem be specified
  411. */
  412.  
  413. enum DrawModeID {AMESA_AGA,AMESA_AGA_C2P /*,AMESA_CYBERGFX,AMESA_RETINA*/};
  414. #define AMA_DrawMode    (AMA_Dummy + 0x0005)
  415. #define AMA_Screen      (AMA_Dummy + 0x0006)
  416. #define AMA_Window      (AMA_Dummy + 0x0007)
  417. #define AMA_RastPort    (AMA_Dummy + 0x0008)
  418.  
  419. /** booleans **/
  420. /*
  421. AMA_DoubleBuf: If specified it uses double Buffering (change buffer with
  422.                     AmigaMesaSwapBuffers()) Turn this on as much as posible
  423.                     it will result in smother looking and faster rendering
  424.                     Defult value: GL_FALSE
  425. AMA_RGBMode: If specified it uses 24bit when drawing (on non 24bit displays it
  426.                  it emuletes 24bit)
  427.                  Defult value: GL_TRUE
  428. AMA_AlphaFlag: Alphachanel ?
  429.                    Defule value: GL_FALSE
  430.  
  431. AMA_Forbid3DHW: if set to GL_TRUE, no 3D HW is used, but a software engine
  432.         default = GL_FALSE (3D-HW allowed)
  433. AMA_Fullscreen: if set to GL_TRUE, a fullscreen driver is launched (supporting
  434.         true multibuffering). Also available in 3D-HW mode.
  435. AMA_DirectRender: if set to GL_TRUE in non-fullscreen-mode, the frame is rendered
  436.         directly into the gfx RAM, the frame is then copied using the blitter.
  437.         (not available for AGA)
  438. AMA_TwoBuffers: allocates two back buffers in double-buffered window mode
  439.         (or AGA fullscreen mode). This is absolutely required, if the GL
  440.         applications requires access to the front buffer
  441.         (glDrawBuffer(GL_FRONT), glReadBuffer(GL_FRONT)). Never set this
  442.         flag, if you don't use these special features.
  443. AMA_Fast:       Tries to render faster as usual, but tries to maintain enough
  444.         OpenGL compatibility for accurate results
  445. AMA_VeryFast:   Tries to render as fast as possible and doesn't care at all
  446.         for OpenGL compliant results.
  447.         If both AMA_Fast and AMA_VeryFast are given, then AMA_VeryFast
  448.         takes precedence. If none of these tags are given, then the
  449.         graphics quality will be maintained as high as possible. Note,
  450.         that 3D hardware might support some effects, but might also
  451.         give slightly different results. Therefore if you want 100
  452.         percent GL compliant results, you should disable 3D hardware
  453.         support using AMA_Forbid3DHW.
  454. AMA_NoDepth:    don't allocate ZBuffer if GL_TRUE
  455. AMA_NoStencil:  don't allocate StencilBuffer if GL_TRUE
  456. AMA_NoAccum:    don't allocate AccumulationBuffer if GL_TRUE
  457. */
  458. #define AMA_DoubleBuf (AMA_Dummy + 0x0030)
  459. #define AMA_RGBMode      (AMA_Dummy + 0x0031)
  460. #define AMA_AlphaFlag (AMA_Dummy + 0x0032)
  461. #define AMA_Forbid3DHW (AMA_Dummy + 0x0033)
  462. #define AMA_Fullscreen (AMA_Dummy + 0x0034)
  463. #define AMA_DirectRender (AMA_Dummy + 0x0035)
  464. #define AMA_TwoBuffers (AMA_Dummy + 0x0036)
  465. #define AMA_Fast (AMA_Dummy + 0x0037)
  466. #define AMA_VeryFast (AMA_Dummy + 0x0038)
  467. #define AMA_NoDepth (AMA_Dummy + 0x0039)
  468. #define AMA_NoStencil (AMA_Dummy + 0x003a)
  469. #define AMA_NoAccum (AMA_Dummy + 0x003b)
  470.  
  471. /** Special **/
  472. /*
  473. AMA_Visual:     If you want to implement your own amigamesa_visual 
  474. AMA_Buffer: If you want to implement your own amigamesa_buffer
  475. AMA_WindowID: A windowID to use when I alloc AMA_Buffer for you if
  476.                   you didn't supply one.(defult=1)
  477. */
  478.  
  479. #define AMA_Visual                      (AMA_Dummy + 0x0041)
  480. #define AMA_Buffer                      (AMA_Dummy + 0x0042)
  481. #define AMA_WindowID                    (AMA_Dummy + 0x0043)
  482.  
  483. #ifdef __cplusplus
  484. }
  485. #endif
  486.  
  487.  
  488. #endif
  489.